﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkloadList.aspx.cs" Inherits="DBA.Web.ProjectManage.WorkloadList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" />

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>
<link href="/Styles/azure/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/Styles/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="/Scripts/lhgdialog/skins/default.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->
    <script src="/Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="/Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="/Scripts/dwz.core.js" type="text/javascript"></script>
<script src="/Scripts/dwz.ui.js" type="text/javascript"></script>
<script src="/Scripts/dwz.sortDrag.js" type="text/javascript"></script>
<script src="/Scripts/dwz.cssTable.js" type="text/javascript"></script>
<script src="/Scripts/dwz.stable.js" type="text/javascript"></script>
<script src="/Scripts/dwz.pagination.js" type="text/javascript"></script>
<script src="/Scripts/dwz.drag.js" type="text/javascript"></script>
<script src="/Scripts/dwz.barDrag.js" type="text/javascript"></script>
<script src="/Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script src="/Scripts/Public.js" type="text/javascript"></script>
<!--
<script src="bin/dwz.min.js" type="text/javascript"></script>
-->
    
    <script type="text/javascript">

        var winAdd;

        function turnModifyPage(id) {
            winAdd = Public.ShowWindow("修改工作量分摊信息", "/ProjectManage/WorkloadAdd.aspx?EmpID=" + $("#hdEmpID").val() + "&id=" + id + "&o=" + Math.round(), 700, 550, null, true);
        }

        function manageStudy(id) {
            Public.ShowWindow("教师进修情况管理", "/SystemManage/EmployeeManage/EmployeeStudyList.aspx?id=" + id + "&o=" + Math.round(), 700, 450);
        }

        function searchHandler() {
            __doPostBack("linkBtnSearch", "");
        }
        function RefreshGrid() {
            Public.RefreshTable("AspNetPager1");
        }

        function initTable(_box) {
            var $p = $(_box || document);
            //tables
            $("table.table", $p).jTable();
            // css tables
            $('table.list', $p).cssTable();
        }
        function ddd() {
            $("#dialog-form").dialog("open");
        }
        function addDate() {
            Public.ShowWindow('添加工作量分摊信息', "/ProjectManage/WorkloadAdd.aspx?EmpID=" + $("#hdEmpID").val(), 700, 450, null, true);
        }
    </script>
    <script type="text/javascript">
        $(function () {
            if ($("#hidType").val() == "0") {
                $("#btnAdd").css("display", "none");
                $("#btnDel").css("display", "none");
                $("th[name='modify']").css("display", "none");
                $("td[name='modify']").css("display", "none");
            }
            //初始化
            DWZ.init("/dwz.frag.xml");
            //必须要加这个不然第一次加载的时候表格数据出不来
            setTimeout("initTable()", 1);
            //updatepanel回调完成后初始化表格
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
                initTable();
            });

        });
        //批量删除事件
        function deleteSelect() {
            var selectValue = $("#tableBody").getAllSelectedValue().join(",");
            if (selectValue != undefined && selectValue != '') {
                parent.alertMsg.confirm("是否删除选择的信息?", {
                    okCall: function () {
                        $("#hidDeleString").val(selectValue);
                        __doPostBack("linkBtnDeleSelect", "");
                    }
                });
            } else {
                parent.alertMsg.info("请选择要删除要的数据");
            }
        }
	</script>
</head>
<body style="background-color:#fff;">
    <form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>    
    <div class="pageHeader">
      <div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					年份：<asp:TextBox ID="txtCountry" runat="server" style="width:100px;" CssClass="textInput"></asp:TextBox>
				</td>            
             
			</tr>
     
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button  onclick="javascript:searchHandler();return false;">检索</button></div></div></li>
				<li style="display:none;"><a class="button" href="#" onclick="javascirpt:ddd();return false;"><span>高级检索</span></a></li>
			</ul>
		</div>
        <div style="display:none;">
                    <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                    <ContentTemplate>
                    <asp:HiddenField ID="hdMaskMemberId" runat="server" />
                      <asp:LinkButton ID="linkBtnSearch" runat="server" onclick="linkBtnSearch_Click" ></asp:LinkButton>      
                      <asp:LinkButton ID="linkBtnMaskSearch" runat="server" onclick="linkBtnMaskSearch_Click" ></asp:LinkButton> 
                        <asp:HiddenField ID="hidDeleString" runat="server" />  
                      <asp:LinkButton ID="linkBtnDeleSelect" runat="server" onclick="linkBtnDeleSelect_Click" ></asp:LinkButton> 
                    </ContentTemplate>
                    </asp:UpdatePanel>
         </div>
       </div>     
	</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li id="btnAdd"><a class="add" href="javascript:void(0);" onclick="javascript:addDate();return false;"><span>添加:</span></a></li>
			<li id="btnDel"><a class="delete" href="javascript:void(0);" onclick="javascript:deleteSelect();return false;"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li id="li_import" runat="server"><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
<asp:UpdatePanel runat="server" ID="UpdatePanel3">
<ContentTemplate>
    <asp:HiddenField ID="hdSaveID" runat="server" /> <%--保存选择的类型id--%>   
    <asp:HiddenField ID="hdEmpID" runat="server" />
       <asp:HiddenField ID="hidType" runat="server" />
	<table class="table" width="100%" >
		<thead>
			<tr>
                <th><input id="allChk" title="全选" onclick="javascript:$(this).SelectAll('tableBody');" value="all" type="checkbox" name="allChk"/></th>
                <th>时间</th>
                <th>经费</th>               
                <th name="modify">操作</th>            
			</tr>
		</thead>
		<tbody id="tableBody">
        <asp:Repeater ID="replData" runat="server">
        <ItemTemplate>
			<tr target="id" rel="<%# Eval("ws_ID") %>">
                <td><INPUT id="Checkbox1" type="checkbox" name="chkson" onclick="javascript:$(this).singleSelected('allChk');" runat="server" class="checkbox" value='<%# Eval("ws_ID") %>'></td>
                <td><%# Eval("ws_year")%></td>
                <td><%# Eval("ws_Money")%></td>
           
                <td name="modify"><a href="javascript:void(0);" onclick="javascript:turnModifyPage($(this).getTabRowId());return false;">修改</a>&nbsp;&nbsp;</td>
			</tr>
        </ItemTemplate>
        </asp:Repeater>
		</tbody>
	</table>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="<div class='content'>第%CurrentPageIndex%/共%PageCount%页/共%RecordCount%条</div>"
                    FirstPageText="首页" LastPageText="末页" NextPageText="下页"
                    PrevPageText="上页" ShowCustomInfoSection="right" 
        ShowPageIndexBox="Never"  PageSize="10" Width="100%" CustomInfoClass="info"
        CssClass="paginator" onpagechanging="AspNetPager1_PageChanging" >
    </webdiyer:AspNetPager>
     </ContentTemplate>
                </asp:UpdatePanel>
    	
    </div>
   </form>
</body>
</html>
